home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!lorelei.demon.co.uk
- From: John Croudy <john@lorelei.demon.co.uk>
- Newsgroups: comp.lang.c++
- Subject: Re: const member functions
- Date: Sun, 7 Apr 96 18:48:51 GMT
- Organization: home
- Message-ID: <9604071848.AA001nw@lorelei.demon.co.uk>
- References: <316588E6.7D61@geoplex.com>
- X-NNTP-Posting-Host: lorelei.demon.co.uk
- X-Newsreader: TIN [AMIGA 1.3 950726BETA PL0]
- X-Mail2News-Path: relay-4.mail.demon.net!post.demon.co.uk!lorelei.demon.co.uk
-
- I tried removing the private method, and then it worked. So it seems
- that the compiler will choose the const method for a non-const object
- only if there is no other suitable method defined. If it finds a
- suitable non-const method it will choose that, even if it means it will
- fail because it is private. It seems that the check for constness
- overrides the check for availability. Hmm...
-
- John
- xxxx
-